package com.tianshuo.config;

import com.tianshuo.model.BdObject;
import com.tianshuo.model.X;
import com.tianshuo.model.Y;
import org.springframework.context.annotation.*;

/**
 * @ClassName : AppConfig
 * @Description : Annotation配置类
 * @Author : tianshuo
 * @Date: 2020-08-20 11:23
 */
@Configuration
@ComponentScans(value={@ComponentScan(value="com.tianshuo")})
@ImportResource(value = "classpath:spring.xml")
public class AppConfig {


    @Bean
    public BdObject bdObject() {
        return new BdObject();
    }


    @Bean
    public X x() {
        System.out.println("x");
        return new X();
    }

    @Bean
    public Y y() {
        x();
        return new Y();
    }

    class A {

    }
}

